#pragma once
#ifdef SERIALPORT_EXPORTS
#define SERIALPORT_EXPORT __declspec(dllexport)
#else
#define SERIALPORT_EXPORT __declspec(dllimport)
#endif // SERIALPORT_EXPORTS
namespace Base
{
	namespace Comm
	{
		class SERIALPORT_EXPORT SerialPort
		{
		public:
			SerialPort();
			~SerialPort();
		public:
			long GetErrorCode();
			long SetTimeout(long msec);
			long Read(char* szbuf, long size);
			long Write(char* szbuf, long size);
			long Open(short port, long rate);
			long Close();
		private:
			void* impl;
		};
	}
}

